using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace OBUCare.Core.Models
{
    /// <summary>
    /// 统计操作员每天的开发票统计
    /// </summary>
    public partial class View_Operator_InvoiceInfos
    {
        [DisplayName("日期")]
        public Nullable<System.DateTime> RECORD_TIME { get; set; }
        [DisplayName("营业厅")]
        public string AGENT_NO { get; set; }
        [DisplayName("营业厅")]
        public string AGENT_NAME { get; set; }
        [DisplayName("操作员")]
        public string OPERATOR_NO { get; set; }
        [DisplayName("操作员")]
        public string OPERATOR_NAME { get; set; }
        [DisplayName("金额")]
        public Nullable<decimal> FUND_AMOUNT { get; set; }
        [DisplayName("发票类型")]
        public int INVOICE_TYPE { get; set; }
        [DisplayName("发票张数")]
        public Nullable<int> InvoiceCount { get; set; }
        [DisplayName("金额")]
        public Nullable<decimal> Amount { get; set; }
        [DisplayName("项目")]
        public string FeeType { get; set; }

        [DisplayName("国税金额")]
        public decimal? StatetaxAmount {
            get
            {
                if (INVOICE_TYPE == 1)
                    return Amount;
                else
                    return 0;
            }
        }

        [DisplayName("国税张数")]
        public decimal? StatetaxCount
        {
            get
            {
                if (INVOICE_TYPE == 1)
                    return InvoiceCount;
                else
                    return 0;
            }
        }

        [DisplayName("地税金额")]
        public decimal? LocaltaxAmount
        {
            get
            {
                if (INVOICE_TYPE == 2)
                    return Amount;
                else
                    return 0;
            }
        }

        [DisplayName("地税张数")]
        public decimal? LocaltaxCount
        {
            get
            {
                if (INVOICE_TYPE ==2)
                    return InvoiceCount;
                else
                    return 0;
            }
        }

        [DisplayName("收据金额")]
        public decimal? ReceipttaxAmount
        {
            get
            {
                if (INVOICE_TYPE == 3)
                    return Amount;
                else
                    return 0;
            }
        }

        [DisplayName("收据张数")]
        public decimal? ReceipttaxCount
        {
            get
            {
                if (INVOICE_TYPE == 3)
                    return InvoiceCount;
                else
                    return 0;
            }
        }
    }
}
